﻿Imports System.Data.Entity.Validation
Imports System
Imports System.Security.Claims
Imports System.Web.UI
Imports System.Data.OleDb
Public Class AddSmsTags
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub
    Protected Sub Button3_Click(sender As Object, e As EventArgs)

        Dim oleDbConn As New OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("ConnectionString004").ConnectionString)
        Dim SqlString As String = "Insert into sms_tags(Tag) Values (@f1)"

        Dim cmd As OleDbCommand = New OleDbCommand(SqlString, oleDbConn)

        cmd.CommandType = CommandType.Text
        cmd.Parameters.AddWithValue("@f1", txt_sms_tag.Text)

        oleDbConn.Open()
        cmd.ExecuteNonQuery()
        txt_sms_tag.Text = ""
        ScriptManager.RegisterClientScriptBlock( _
              Me, _
              GetType(Page), _
              "script", _
              "returnempcode();", _
              True)
    End Sub

    <System.Web.Services.WebMethod>
    Private Sub Disable(value As String, url As String)

    End Sub
End Class